Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--com.pacist.diamonds.DiamondCanvas | +--com.pacist.diamonds.Controller | +--com.pacist.diamonds.AngularController
Fields inherited from class com.pacist.diamonds.Controller | |
canMeasure, listeners, maxValue, minValue, postOnMouseDown, postWhileDragging, showValue, value |
Fields inherited from class com.pacist.diamonds.DiamondCanvas | |
tipText |
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Constructor Summary | |
AngularController()
Creates and initializes a new AngularController object with a minimum value of 0, maximum value of 100, and an initial value of 0. |
|
AngularController(int min,
int max,
int initial)
Creates and initializes a new AngularController object with the specified minimum, maximum, and initial values. |
Method Summary | |
int | angleToValue(double angle)
This method converts a given angle to a value, using the pre-specified minimum and maximum values. |
java.awt.Point | getCentre()
The method gets the center (x,y) position of the AngularController. |
java.awt.Rectangle | getDisplayRect()
Gets the display rectangle for the AngularController. |
java.awt.Rectangle | getDisplayRect(java.awt.Dimension size)
Gets the display rectangle for a given Dimension. |
void | paint(java.awt.Graphics g)
This method is called to repaint the AngularController. |
void | paintTick(java.awt.Graphics g,
int x,
int y,
double angle,
int startXRadius,
int endXRadius)
This method paints a "Tick" at a specified angle given a Graphics context, x, y, startXRadius, and endXRadius values. |
int | pointToValue(int x,
int y)
This method converts a point (x, y) to a value. |
int | scaleForY(int xRadius)
This method takes a radius and gives the Y scale for the current display rectangle. |
int | scaleForY(java.awt.Rectangle displayRect,
int xRadius)
This method takes a radius and a specified display rectangle and gives the Y scale. |
double | valueToAngle(int v)
This method converts a given value to an angle, using the pre-specified minimum and maximum values. |
Methods inherited from class com.pacist.diamonds.Controller | |
addControllerListener, getMaxValue, getMinValue, getPostOnMouseDown, getShowValue, getValue, getValueString, isMaxAtBottom, mouseDragged, mousePressed, mouseReleased, notifyValueChange, pinValue, pointToValue, processMouseEvent, processMouseMotionEvent, removeControllerListener, setMaxAtBottom, setMaxValue, setMinValue, setPostOnMouseDown, setShowValue, setValue |
Methods inherited from class com.pacist.diamonds.DiamondCanvas | |
getTipText, mouseEnter, mouseExit, processMouseEvent, setTipText |
Methods inherited from class java.awt.Canvas | |
addNotify, paint |
Methods inherited from class java.awt.Component | |
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Constructor Detail |
public AngularController()
public AngularController(int min, int max, int initial)
min
- The minimum value of the controller.
max
- The maximum value of the controller.
initial
- The initial value of the controller.Method Detail |
protected java.awt.Rectangle getDisplayRect()
protected java.awt.Rectangle getDisplayRect(java.awt.Dimension size)
protected double valueToAngle(int v)
minimum
and maximum
values.double
value.protected int angleToValue(double angle)
minimum
and maximum
values.int
valueprotected int pointToValue(int x, int y)
x
- The x coordinate.
y
- The y coordinate.int
value.
Note : A value of 0 indicates the top.
protected int scaleForY(int xRadius)
xRadius
- The radius.int
value.protected int scaleForY(java.awt.Rectangle displayRect, int xRadius)
displayRect
- The display rectangle.
xRadius
- The radius.int
value.protected java.awt.Point getCentre()
Point
value.public void paintTick(java.awt.Graphics g, int x, int y, double angle, int startXRadius, int endXRadius)
g
- The graphics context to use for painting.
x
- The x offset.
y
- The y offset.
angle
- The angle.
startXRadius
- The starting x radius.
endXRadius
- The ending x radius.public void paint(java.awt.Graphics g)
g
- The graphics context to use for painting.Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |